#ifndef OPRETURN
#define OPRETURN

#include "VMPFocus.hpp"
#include "operations.hpp"

#include "hlp blank.hpp"

//Operation return:
//Formula:
//return:blank:?:expression:
cText TEXT_EXPRESSION=":expression:";

//PreLining:
void funOpRetPreL(ListIdentity* what){
	ptrOperation op=Operations[TEXT_BLANK];
	for(int i=0; i<what->length(); ++i){
		if ((*what)[i]->Operation==op)
			(*what)[i]->Identifier=&TEXT_BLANK;
		else
			(*what)[i]->Identifier=&TEXT_ELEMENT;
	};
}

//PostLining:

//MkTree:

//Evaluate:
sRecord funOpRetEva(ptrRETNode retnode, ptrParsedElement pe, void* scope){
	throw eval(retnode,pe->SubElements[0],0);
	return sRecord();//Useless...
}

ptrOperation loadOpRet(){
	return new cOperation(
		"return",
		"return(:blank::element:)?", //Needs to be finished.
		funOpRetEva,
		funOpRetPreL
	);
}
#endif